import request from '@/utils/request'
import store from '@/store'
export function login(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}
// 获取用户信息
export function getUserInfo() {
  return request({
    url: '/sys/profile',
    method: 'post',
    headers: {
      Authorization: `Bearer ${store.getters.token}`
    }
  })
}
// 加载员工基本信息
export function getUserDetailById(id) {
  return request({
    url: `/sys/user/${id}`
  })
}
export function getUserDetail(id) {
  return request({
    url: `/sys/user/${id}`
  })
}
